﻿using DevExpress.Data.Filtering;
using Volo.Abp.DependencyInjection;
using YAPACS.BusinessObjects.Exams;
using YAPACS.Workflows;

namespace YAPACS.RisServer.Workflows.TabPanel.Queue;

public class GetDefaultFilter:WorkflowBase, IGetDefaultFilter,ITransientDependency
{
    protected override async Task<WorkflowOutput> InvokeCoreAsync(WorkflowInput input)
    {
        CriteriaOperator criteriaOperator = CriteriaOperator.FromLambda<BusinessObjects.Exams.Exam>(e => e.ExamQueuing!=null&&e.ExamQueuing.Status== ExamQueuingStatus.Wait);
        input.Add("Output", criteriaOperator);
        return await Task.FromResult(new WorkflowOutput
        {
            Success = true
        });
    }
}
